.class public Lcom/android/inputmethod/latin/LatinIMESettings;
.super Landroid/preference/PreferenceActivity;
.source "LatinIMESettings.java"

# interfaces
.implements Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;
.implements Landroid/preference/Preference$OnPreferenceChangeListener;
.implements Landroid/preference/Preference$OnPreferenceClickListener;


# static fields
.field static final ACTION_CLEAR_UAD:Ljava/lang/String; = "com.android.inputmethod.userdictionary.clear"

.field private static final CLEAR_DICT:Ljava/lang/String; = "clear_dict_key"

.field private static final DEVICE_KEYBOARD:Ljava/lang/String; = "device_keyboard_settings"

.field private static final PREDICTION_SETTINGS_KEY:Ljava/lang/String; = "prediction_settings"

.field private static final PREFERRED_DICTATION_ENGINE:Ljava/lang/String; = "preferred_dictation_engine_key"

.field private static final SHOW_SUGGESTIONS_KEY:Ljava/lang/String; = "show_suggestions"

.field private static final VOICE_DICTATION:Ljava/lang/String; = "voice_dictation_key"


# instance fields
.field private mHardKeyboard:Landroid/preference/Preference;

.field private mKeyClearDictionary:Landroid/preference/Preference;

.field private mKeyVoiceInputEngine:Landroid/preference/ListPreference;

.field private mQuickFixes:Landroid/preference/CheckBoxPreference;

.field private mShowSuggestions:Landroid/preference/CheckBoxPreference;

.field private mVoiceDictation:Landroid/preference/CheckBoxPreference;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 44
    invoke-direct {p0}, Landroid/preference/PreferenceActivity;-><init>()V

    .line 58
    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mHardKeyboard:Landroid/preference/Preference;

    .line 64
    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    .line 65
    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyClearDictionary:Landroid/preference/Preference;

    return-void
.end method

.method static synthetic access$000(Lcom/android/inputmethod/latin/LatinIMESettings;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 44
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->clearUAD()V

    return-void
.end method

.method static synthetic access$100(Lcom/android/inputmethod/latin/LatinIMESettings;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 44
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->showToast()V

    return-void
.end method

.method private clearUAD()V
    .locals 2

    .prologue
    .line 241
    new-instance v0, Landroid/content/Intent;

    const-string v1, "com.android.inputmethod.userdictionary.clear"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 242
    .local v0, intent:Landroid/content/Intent;
    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIMESettings;->sendBroadcast(Landroid/content/Intent;)V

    .line 243
    return-void
.end method

.method private initHardKeyboardSetting()V
    .locals 3

    .prologue
    .line 109
    const-string v1, "device_keyboard_settings"

    invoke-virtual {p0, v1}, Lcom/android/inputmethod/latin/LatinIMESettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v1

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mHardKeyboard:Landroid/preference/Preference;

    .line 110
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object v0

    .line 111
    .local v0, config:Landroid/content/res/Configuration;
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mHardKeyboard:Landroid/preference/Preference;

    if-eqz v1, :cond_0

    if-eqz v0, :cond_0

    iget v1, v0, Landroid/content/res/Configuration;->keyboard:I

    const/4 v2, 0x1

    if-ne v1, v2, :cond_0

    .line 112
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

    move-result-object v1

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mHardKeyboard:Landroid/preference/Preference;

    invoke-virtual {v1, v2}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

    .line 114
    :cond_0
    return-void
.end method

.method private initVoiceInputEngineList()V
    .locals 10

    .prologue
    const v8, 0x7f060001

    const/4 v9, 0x0

    .line 123
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    if-nez v7, :cond_1

    .line 161
    :cond_0
    :goto_0
    return-void

    .line 127
    :cond_1
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v4

    .line 128
    .local v4, sp:Landroid/content/SharedPreferences;
    if-eqz v4, :cond_0

    .line 131
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getTextArray(I)[Ljava/lang/CharSequence;

    move-result-object v0

    .line 132
    .local v0, entries:[Ljava/lang/CharSequence;
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getTextArray(I)[Ljava/lang/CharSequence;

    move-result-object v1

    .line 133
    .local v1, entryValues:[Ljava/lang/CharSequence;
    if-eqz v0, :cond_2

    if-eqz v1, :cond_2

    array-length v7, v0

    array-length v8, v1

    if-eq v7, v8, :cond_3

    .line 134
    :cond_2
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7, v9}, Landroid/preference/ListPreference;->setEnabled(Z)V

    .line 136
    :cond_3
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    const/4 v8, 0x1

    invoke-virtual {v7, v8}, Landroid/preference/ListPreference;->setEnabled(Z)V

    .line 137
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7, v0}, Landroid/preference/ListPreference;->setEntries([Ljava/lang/CharSequence;)V

    .line 138
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7, v1}, Landroid/preference/ListPreference;->setEntryValues([Ljava/lang/CharSequence;)V

    .line 140
    const-string v7, "preferred_dictation_engine_key"

    const/4 v8, 0x0

    invoke-interface {v4, v7, v8}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    .line 141
    .local v6, value:Ljava/lang/String;
    const/4 v3, 0x0

    .line 142
    .local v3, index:I
    if-eqz v6, :cond_4

    .line 143
    const/4 v2, 0x0

    .local v2, i:I
    :goto_1
    array-length v7, v1

    if-ge v2, v7, :cond_4

    .line 144
    aget-object v7, v1, v2

    invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_7

    .line 145
    move v3, v2

    .line 150
    .end local v2           #i:I
    :cond_4
    array-length v7, v1

    if-lt v3, v7, :cond_5

    const/4 v3, 0x0

    .line 151
    :cond_5
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7, v3}, Landroid/preference/ListPreference;->setValueIndex(I)V

    .line 153
    aget-object v7, v0, v3

    invoke-virtual {v7}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v5

    .line 154
    .local v5, summary:Ljava/lang/String;
    if-eqz v5, :cond_6

    .line 155
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7, v5}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V

    .line 156
    :cond_6
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 157
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7, p0}, Landroid/preference/ListPreference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 158
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mVoiceDictation:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v7}, Landroid/preference/CheckBoxPreference;->isChecked()Z

    move-result v7

    if-nez v7, :cond_0

    .line 159
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7, v9}, Landroid/preference/ListPreference;->setEnabled(Z)V

    goto :goto_0

    .line 143
    .end local v5           #summary:Ljava/lang/String;
    .restart local v2       #i:I
    :cond_7
    add-int/lit8 v2, v2, 0x1

    goto :goto_1
.end method

.method private showClearDictAlertDialogue()V
    .locals 6

    .prologue
    .line 208
    new-instance v1, Landroid/app/AlertDialog$Builder;

    invoke-direct {v1, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 209
    .local v1, builder:Landroid/app/AlertDialog$Builder;
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f0a0085

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 210
    .local v2, title:Ljava/lang/String;
    invoke-virtual {v1, v2}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v5, 0x7f0a0087

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    const/4 v4, 0x0

    invoke-virtual {v3, v4}, Landroid/app/AlertDialog$Builder;->setCancelable(Z)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v5, 0x7f0a0088

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v4

    new-instance v5, Lcom/android/inputmethod/latin/LatinIMESettings$2;

    invoke-direct {v5, p0}, Lcom/android/inputmethod/latin/LatinIMESettings$2;-><init>(Lcom/android/inputmethod/latin/LatinIMESettings;)V

    invoke-virtual {v3, v4, v5}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v3

    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v5, 0x7f0a0089

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v4

    new-instance v5, Lcom/android/inputmethod/latin/LatinIMESettings$1;

    invoke-direct {v5, p0}, Lcom/android/inputmethod/latin/LatinIMESettings$1;-><init>(Lcom/android/inputmethod/latin/LatinIMESettings;)V

    invoke-virtual {v3, v4, v5}, Landroid/app/AlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 226
    invoke-virtual {v1}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    .line 227
    .local v0, alert:Landroid/app/AlertDialog;
    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

    .line 228
    return-void
.end method

.method private showToast()V
    .locals 7

    .prologue
    const/4 v6, 0x0

    .line 231
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    .line 232
    .local v0, context:Landroid/content/Context;
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v5, 0x7f0a008a

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 233
    .local v2, text:Ljava/lang/String;
    const/4 v1, 0x0

    .line 235
    .local v1, duration:I
    invoke-static {v0, v2, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v3

    .line 236
    .local v3, toast:Landroid/widget/Toast;
    const/16 v4, 0x11

    invoke-virtual {v3, v4, v6, v6}, Landroid/widget/Toast;->setGravity(III)V

    .line 237
    invoke-virtual {v3}, Landroid/widget/Toast;->show()V

    .line 238
    return-void
.end method

.method private updateVoiceInputEngine(Ljava/lang/String;)V
    .locals 8
    .parameter "newValue"

    .prologue
    .line 164
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v5

    .line 165
    .local v5, sp:Landroid/content/SharedPreferences;
    invoke-interface {v5}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    .line 166
    .local v0, editor:Landroid/content/SharedPreferences$Editor;
    if-eqz v0, :cond_0

    if-nez v5, :cond_1

    .line 188
    :cond_0
    :goto_0
    return-void

    .line 169
    :cond_1
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7}, Landroid/preference/ListPreference;->getEntries()[Ljava/lang/CharSequence;

    move-result-object v1

    .line 170
    .local v1, entries:[Ljava/lang/CharSequence;
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7}, Landroid/preference/ListPreference;->getEntryValues()[Ljava/lang/CharSequence;

    move-result-object v2

    .line 171
    .local v2, entryValues:[Ljava/lang/CharSequence;
    const/4 v4, 0x0

    .line 172
    .local v4, index:I
    if-eqz p1, :cond_2

    .line 173
    const/4 v3, 0x0

    .local v3, i:I
    :goto_1
    array-length v7, v2

    if-ge v3, v7, :cond_2

    .line 174
    aget-object v7, v2, v3

    invoke-virtual {p1, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_4

    .line 175
    move v4, v3

    .line 180
    .end local v3           #i:I
    :cond_2
    array-length v7, v2

    if-lt v4, v7, :cond_3

    const/4 v4, 0x0

    .line 181
    :cond_3
    const-string v7, "preferred_dictation_engine_key"

    invoke-interface {v0, v7, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    .line 182
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7, v4}, Landroid/preference/ListPreference;->setValueIndex(I)V

    .line 184
    aget-object v7, v1, v4

    invoke-virtual {v7}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v6

    .line 185
    .local v6, summary:Ljava/lang/String;
    iget-object v7, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v7, v6}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V

    .line 187
    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    goto :goto_0

    .line 173
    .end local v6           #summary:Ljava/lang/String;
    .restart local v3       #i:I
    :cond_4
    add-int/lit8 v3, v3, 0x1

    goto :goto_1
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1
    .parameter "icicle"

    .prologue
    .line 69
    invoke-super {p0, p1}, Landroid/preference/PreferenceActivity;->onCreate(Landroid/os/Bundle;)V

    .line 70
    const v0, 0x7f04000e

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIMESettings;->addPreferencesFromResource(I)V

    .line 72
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->initHardKeyboardSetting()V

    .line 73
    const-string v0, "show_suggestions"

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIMESettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/CheckBoxPreference;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mShowSuggestions:Landroid/preference/CheckBoxPreference;

    .line 74
    const-string v0, "voice_dictation_key"

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIMESettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/CheckBoxPreference;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mVoiceDictation:Landroid/preference/CheckBoxPreference;

    .line 75
    const-string v0, "preferred_dictation_engine_key"

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIMESettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    check-cast v0, Landroid/preference/ListPreference;

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    .line 76
    const-string v0, "clear_dict_key"

    invoke-virtual {p0, v0}, Lcom/android/inputmethod/latin/LatinIMESettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v0

    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyClearDictionary:Landroid/preference/Preference;

    .line 77
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getPreferenceManager()Landroid/preference/PreferenceManager;

    move-result-object v0

    invoke-virtual {v0}, Landroid/preference/PreferenceManager;->getSharedPreferences()Landroid/content/SharedPreferences;

    move-result-object v0

    invoke-interface {v0, p0}, Landroid/content/SharedPreferences;->registerOnSharedPreferenceChangeListener(Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;)V

    .line 79
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyClearDictionary:Landroid/preference/Preference;

    if-eqz v0, :cond_0

    .line 80
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyClearDictionary:Landroid/preference/Preference;

    invoke-virtual {v0, p0}, Landroid/preference/Preference;->setOnPreferenceClickListener(Landroid/preference/Preference$OnPreferenceClickListener;)V

    .line 82
    :cond_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mVoiceDictation:Landroid/preference/CheckBoxPreference;

    if-eqz v0, :cond_1

    .line 83
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mVoiceDictation:Landroid/preference/CheckBoxPreference;

    invoke-virtual {v0, p0}, Landroid/preference/CheckBoxPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

    .line 85
    :cond_1
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->initVoiceInputEngineList()V

    .line 86
    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .prologue
    .line 102
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getPreferenceManager()Landroid/preference/PreferenceManager;

    move-result-object v0

    invoke-virtual {v0}, Landroid/preference/PreferenceManager;->getSharedPreferences()Landroid/content/SharedPreferences;

    move-result-object v0

    invoke-interface {v0, p0}, Landroid/content/SharedPreferences;->unregisterOnSharedPreferenceChangeListener(Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;)V

    .line 104
    invoke-super {p0}, Landroid/preference/PreferenceActivity;->onDestroy()V

    .line 105
    return-void
.end method

.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/Object;)Z
    .locals 3
    .parameter "preference"
    .parameter "newValue"

    .prologue
    .line 190
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    if-ne p1, v2, :cond_0

    .line 191
    move-object v0, p2

    check-cast v0, Ljava/lang/String;

    move-object v2, v0

    invoke-direct {p0, v2}, Lcom/android/inputmethod/latin/LatinIMESettings;->updateVoiceInputEngine(Ljava/lang/String;)V

    .line 193
    :cond_0
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mVoiceDictation:Landroid/preference/CheckBoxPreference;

    if-ne p1, v2, :cond_1

    .line 194
    check-cast p2, Ljava/lang/Boolean;

    .end local p2
    invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v1

    .line 195
    .local v1, value:Z
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    if-eqz v2, :cond_1

    .line 196
    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyVoiceInputEngine:Landroid/preference/ListPreference;

    invoke-virtual {v2, v1}, Landroid/preference/ListPreference;->setEnabled(Z)V

    .line 199
    .end local v1           #value:Z
    :cond_1
    const/4 v2, 0x1

    return v2
.end method

.method public onPreferenceClick(Landroid/preference/Preference;)Z
    .locals 1
    .parameter "preference"

    .prologue
    .line 202
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinIMESettings;->mKeyClearDictionary:Landroid/preference/Preference;

    if-ne p1, v0, :cond_0

    .line 203
    invoke-direct {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->showClearDictAlertDialogue()V

    .line 205
    :cond_0
    const/4 v0, 0x1

    return v0
.end method

.method protected onResume()V
    .locals 2

    .prologue
    .line 90
    invoke-super {p0}, Landroid/preference/PreferenceActivity;->onResume()V

    .line 91
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinIMESettings;->getListView()Landroid/widget/ListView;

    move-result-object v1

    invoke-static {v1}, Landroid/text/AutoText;->getSize(Landroid/view/View;)I

    move-result v0

    .line 92
    .local v0, autoTextSize:I
    const/4 v1, 0x1

    if-ge v0, v1, :cond_0

    .line 98
    :cond_0
    return-void
.end method

.method public onSharedPreferenceChanged(Landroid/content/SharedPreferences;Ljava/lang/String;)V
    .locals 1
    .parameter "sharedPreferences"
    .parameter "key"

    .prologue
    .line 119
    new-instance v0, Landroid/app/backup/BackupManager;

    invoke-direct {v0, p0}, Landroid/app/backup/BackupManager;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0}, Landroid/app/backup/BackupManager;->dataChanged()V

    .line 120
    return-void
.end method
